package cn.ddiancan.xddcloud.psc.flow.entity;

import java.io.Serializable;
import java.util.Date;

import cn.ddiancan.xddcloud.psc.flow.engine.core.FlowCreator;
import lombok.Getter;
import lombok.Setter;

/**
 * 流程表实体基类
 * @since 1.0
 */
@Getter
@Setter
public class FlowEntity implements Serializable {

    /**
     * 主键ID
     */
    protected Long id;

    /**
     * 租户ID
     */
    protected String tenantId;

    /**
     * 创建人ID
     */
    protected String createName;

    /**
     * 创建人名称
     */
    protected Long createBy;

    /**
     * 创建时间
     */
    protected Date createTime;

    public void setFlowCreator(FlowCreator flowCreator) {
        this.tenantId = flowCreator.getTenantId();
        this.createName = flowCreator.getCreateName();
        this.createBy = flowCreator.getCreateBy();
    }
}
